<template>
  <n-config-provider :theme="theme">
    <n-dialog-provider>
      <n-message-provider>
        <router-view/>
      </n-message-provider>
    </n-dialog-provider>
  </n-config-provider>
</template>

<script setup lang="ts">
import {onMounted} from 'vue'
import {NConfigProvider, NDialogProvider, NMessageProvider} from "naive-ui";
import {useThemeStore} from './stores/theme'
import {storeToRefs} from 'pinia'

const themeStore = useThemeStore()
const {theme} = storeToRefs(themeStore)
const {init} = themeStore

onMounted(() => {
  init()
})
</script>